;

(function ($, window, document, undefined) {
    'use strict';
    var $winW = function () {
        return $(window).width();
    };
    var $winH = function () {
        return $(window).height();
    };
    var $screensize = function (element) {
        $(element).width($winW()).height($winH());
    };
    var screencheck = function (mediasize) {
        if (typeof window.matchMedia !== "undefined") {
            var screensize = window.matchMedia("(max-width:" + mediasize + "px)");
            if (screensize.matches) {
                return true;
            } else {
                return false;
            }
        } else {
            if ($winW() <= mediasize) {
                return true;
            } else {
                return false;
            }
        }
    };
    $(function () {
        ckeckFullpage();
        checkHeader();
        //回到顶部
        //页面文档的高度>浏览器当前窗口可视区域高度
        checkScroll();
        videoH();
        new WOW().init();

        function checkScroll() {
            if (($(document.body).outerHeight(true) > $(window).height()) && ($(window).width() >= 768)) {
                $(".bottom-follow .toTop").fadeIn()
            } else {
                $(".bottom-follow .toTop").fadeOut()
            }
        }
        $(".toTop").click(function () {
            $("body,html").animate({
                scrollTop: 0
            }, 500);
            // $("#fullpage").css('transform', 'translateY(0px)')
        });
        // $('#fullpage').fullpage();
        function checkHeader() {
            if ($(window).width() >= 1100) {
                // console.log($(window).width())
                $("#fullpage").siblings(".header").css("position", "fixed")
                $(".fp-section .fp-tableCell").css("padding-top", "70px")

            }
        }

        function videoH() {
            var bannerH = $("#fullpage .section1 .index-banner").height();
            // console.log(bannerH);
           // $(".video-item").height(bannerH)
        }
        $(window).resize(function () {
            checkHeader();
            checkScroll();
            videoH()
        })

        function ckeckFullpage() {
            if ($('.fullpage-default').length) {
                // console.log('全屏滚动')
				
                //$("#fullpage").siblings(".header").addClass("sticked")
                var myFullpage = new fullpage('.fullpage-default', {
                    // licenseKey: ' C7F41B00-5E824594-9A5EFB99-B556A3D5',
                    // anchors: ['slide01', 'slide02', 'slide03', 'slide04'],
                    menu: '#sidebar',
                    lazyLoad: true,
                    navigation: true,
                    navigationPosition: 'right',
                    // scrollOverflow: true,
                    responsiveWidth: 1100,
                    // responsiveHeight: 600,
                    responsiveSlides: true,
                    css3: true,
                    scrollBar: true,
                    afterRender: function () {
                        var wow = new WOW({
                            animateClass: 'animated',
                        });
                        wow.init();
                    }

                });
            }
        }

    });
    $(function () {
        //超过一定高度导航添加类名
        var nav = $("header"); //得到导航对象  
        var win = $(window); //得到窗口对象  
        var sc = $(document); //得到document文档对象。  
        win.scroll(function () {
            if (sc.scrollTop() >= 100) {
                nav.addClass("on");
            } else {
                nav.removeClass("on");
            }
        })

        //移动端展开nav
        $('#navToggle').on('click', function () {
            $('.m_nav').addClass('open');
        })
        //关闭nav
        $('.m_nav .top .closed').on('click', function () {
            $('.m_nav').removeClass('open');
        })

        //二级导航  移动端
        $(".m_nav .ul li").click(function () {
            $(this).children("div.dropdown_menu").slideToggle('slow')
            $(this).siblings('li').children('.dropdown_menu').slideUp('slow');
        });

    });
    $(document).ready(function () {
        $(window).on('load', function () {
            $('.preloader').fadeOut();
            $('.animated-row').each(function () {
                var $this = $(this);
                $this.find('.animate').each(function (i) {
                    var $item = $(this);
                    var animation = $item.data('animate');
                    $item.on('inview', function (event, isInView) {
                        if (isInView) {
                            setTimeout(function () {
                                $item.addClass('animated ' + animation).removeClass('animate');
                            }, i * 50);
                        } else if (!screencheck(767)) {
                            $item.removeClass('animated ' + animation).addClass('animate');
                        }
                    });
                });
            });
        });
        if ($('.facts-list').length) {
            $('.facts-list').owlCarousel({
                loop: true,
                nav: false,
                dots: true,
                items: 3,
                margin: 30,
                autoplay: false,
                smartSpeed: 700,
                autoplayTimeout: 6000,
                responsive: {
                    0: {
                        items: 1,
                        margin: 0
                    },
                    460: {
                        items: 1,
                        margin: 0
                    },
                    576: {
                        items: 2,
                        margin: 20
                    },
                    992: {
                        items: 3,
                        margin: 30
                    }
                }
            });
        }
        if ($('.services-list').length) {
            $('.services-list').owlCarousel({
                loop: true,
                nav: false,
                dots: true,
                items: 3,
                margin: 30,
                autoplay: false,
                smartSpeed: 700,
                autoplayTimeout: 6000,
                responsive: {
                    0: {
                        items: 1,
                        margin: 0
                    },
                    460: {
                        items: 1,
                        margin: 0
                    },
                    576: {
                        items: 2,
                        margin: 20
                    },
                    992: {
                        items: 3,
                        margin: 30
                    }
                }
            });
        }
        if ($('.gallery-list').length) {
            $('.gallery-list').owlCarousel({
                loop: false,
                nav: false,
                dots: true,
                items: 3,
                autoplay: true,
                smartSpeed: 700,
                autoplayTimeout: 4000,
                responsive: {
                    0: {
                        items: 1,
                        margin: 0
                    },
                    576: {
                        items: 2,
                        margin: 20
                    },
                    992: {
                        items: 3,
                        margin: 30
                    }
                }
            });
        }
        $(document).on('click', '.menu-trigger', function () {
            $('body').toggleClass('sidemenu-open');
        }).on('click', '.side-menu .navbar-nav li a', function () {
            $('body').removeClass('sidemenu-open');
        });
    });

    /////////////////////map-joiner/////////////////////
    //tab
    $('.contact.joiner .left-title h5').on('click', function () {
        var _index = $(this).index();
        $(this).addClass('active').siblings('h5').removeClass('active');
        // console.log(_index);
        $('.contact.joiner .right-content').eq(_index).addClass('active').siblings('.right-content').removeClass('active');
    })

    /////////////////////map-joiner  end/////////////////////
    /////////////////////aboutus-company ////////////////////

	
    //关于会员tab切换内容
    $(".joiner-bg .joiner-title-wrap .color-title").on('click', function () {
        var _index = $(this).index();
		
		$(".vip_tip").attr("vim",_index)
        // console.log(_index)
        $(this).removeClass('active').siblings('.color-title').addClass('active');
        $(this).parents(".contact-wrap").find('.joiner-catalog').eq(_index).addClass('active').siblings('.joiner-catalog').removeClass('active');
        $(this).parents(".contact-wrap").find('.joiner-detail').eq(_index).addClass('active').siblings('.joiner-detail').removeClass('active');
        new WOW().init();
    })

    $(".joiner .contact-detail .catalog-wrap h5").on('click', function () {
        var _index = $(this).index();
		var vim=$(".vip_tip").attr("vim");
		//alert($(".joiner-bg .joiner-title-wrap .color-title active").index());
        // console.log(_index)
        // console.log('0000')
        $(this).addClass('active').siblings('h5').removeClass('active');
		if(vim==1){
        $(this).parents(".joiner-catalog").siblings(".joiner-detail").find('.contact-wrap').eq(_index+3).addClass('active').siblings('.contact-wrap').removeClass('active');
        }else{
		$(this).parents(".joiner-catalog").siblings(".joiner-detail").find('.contact-wrap').eq(_index).addClass('active').siblings('.contact-wrap').removeClass('active');	
		}
		new WOW().init();
    })



    //首页十大单品
    var mySwiper = new Swiper('.index-slide', {
        autoplay: true, //可选选项，自动滑动
        loop: true,
        slidesPerView: 4,
        // slidesPerColumn: 2, //显示2行
        spaceBetween: 20,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        observer: true, //修改swiper自己或子元素时，自动初始化swiper  
        observeParents: true, //修改swiper的父元素时，自动初始化swiper  
        breakpoints: {
            //当宽度小于等于479
            479: {
                slidesPerView: 1,
            },
            //当宽度小于等于575
            575: {
                slidesPerView: 1,
            },
            //当宽度小于等于768
            768: {
                slidesPerView: 2,
            }
        },
    })

    //发展历程/企业荣誉 二者切换
    $('.company .timeline .color-title .line-title').on('click', function () {
        var _index = $(this).index();
        // console.log(_index)
        $(this).removeClass('gray-normal').siblings('span').addClass('gray-normal')
        $(this).parents('.timeline').find('.timeline-content .line-container').eq(_index).addClass('active').siblings('.line-container').removeClass('active')
    })
    //发展历程/企业荣誉swiper
    var mySwiper = new Swiper('.swiper-container-process', {
        autoplay: true, //可选选项，自动滑动
        slidesPerView: 4,
        spaceBetween: 50,
        breakpoints: {
            //当宽度小于等于479
            479: {
                slidesPerView: 1,
            },
            //当宽度小于等于575
            575: {
                slidesPerView: 2,
            },
            //当宽度小于等于768
            768: {
                slidesPerView: 2,
            }, //当宽度小于等于992
            992: {
                slidesPerView: 2,
            },
            //当宽度小于等于1100
            1100: {
                slidesPerView: 3,
            },
            1200: {
                slidesPerView: 3,
            }
        },

        navigation: {
            nextEl: '.swiper-button-next1',
            prevEl: '.swiper-button-prev1',
        },
        observer: true, //修改swiper自己或子元素时，自动初始化swiper  
        observeParents: true, //修改swiper的父元素时，自动初始化swiper  
    })
    var mySwiper = new Swiper('.swiper-container-process.swiper-container-honor', {
        autoplay: true, //可选选项，自动滑动
        slidesPerView: 4,
        spaceBetween: 50,
        breakpoints: {
            //当宽度小于等于479
            479: {
                slidesPerView: 1,
            },
            //当宽度小于等于575
            575: {
                slidesPerView: 2,
            },
            //当宽度小于等于768
            768: {
                slidesPerView: 2,
            }, //当宽度小于等于992
            992: {
                slidesPerView: 2,
            },
            //当宽度小于等于1100
            1100: {
                slidesPerView: 3,
            },
            1200: {
                slidesPerView: 3,
            }
        },
        // loop: true,
        navigation: {
            nextEl: '.swiper-button-next2',
            prevEl: '.swiper-button-prev2',
        },
        observer: true, //修改swiper自己或子元素时，自动初始化swiper  
        observeParents: true, //修改swiper的父元素时，自动初始化swiper  
    })

    var mySwiper = new Swiper('.purchase-slide', {
        autoplay: true, //可选选项，自动滑动
        slidesPerView: 4,
        spaceBetween: 15,
        breakpoints: {
            //当宽度小于等于479
            479: {
                slidesPerView: 1,
            },
            //当宽度小于等于575
            575: {
                slidesPerView: 2,
            },
            //当宽度小于等于768
            768: {
                slidesPerView: 2,
            }, //当宽度小于等于992
            992: {
                slidesPerView: 2,
            },
            //当宽度小于等于1100
            1100: {
                slidesPerView: 3,
            },
            1200: {
                slidesPerView: 3,
            }
        },
        loop: true,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        observer: true, //修改swiper自己或子元素时，自动初始化swiper  
        observeParents: true, //修改swiper的父元素时，自动初始化swiper  
    })

    // 公司公告调用分页
    $('.page-uplist .list-wrap').paginathing({
        perPage: 10,
        insertAfter: '.page-uplist',
        pageNumbers: true
    });
    $(".jumpval").keyup(function () {
        var c = $(this);
        if (/[^\d]/.test(c.val())) {
            var temp = c.val().replace(/[^\d]/g, '');
            $(this).val(temp);
            $("#t1").css({
                'display': 'block'
            });
        } else {
            $("#t1").css({
                'display': 'none'
            });
        }
    })
})(jQuery, window, document);

"use strict";
!
function (t, i) {
    var e = {
        id: "#cardArea",
        sid: ".card-item"
    };
    i.fn.cardArea = function (t) {
        var t = i.extend({},
            e, t);
        return this.each(function () {
            var e = i(t.id),
                n = e.find(t.sid);
            n.on("mouseenter",
                function () {
                    i(this).addClass("active").siblings().removeClass("active")
                })
        })
    };
}(window, jQuery);
$("#cardArea").cardArea()
